#ifndef __ming_fyp_render_TextureImpl_h__
#define __ming_fyp_render_TextureImpl_h__

//------------------------------------------------------------------------------
// header includes
#include "fyp/render/Texture.h"

struct IDirect3DTexture9;

//------------------------------------------------------------------------------
namespace ming
{
namespace fyp
{
namespace render
{
	class TResourceFactory;

	//--------------------------------------------------------------------------
	class TTextureImpl : public ITexture
	{
	public:
		//------------------------------
		// #cstor & #dstor
		TTextureImpl(const char *filename, TResourceFactory *resFactory);
		~TTextureImpl();
		
		//------------------------------
		// external operations
		virtual void* GetApiTexture();

		virtual tuple<size_t, size_t> GetActualSize();

		virtual void SetAddressMode(
			TAddressMode u,
			TAddressMode v,
			TAddressMode w);
		
		virtual void SetFilterMode(
			TFilterMode minFilter,
			TFilterMode magFilter,
			TFilterMode mipFilter);
		
		virtual TAddressModeSettings GetAddressMode();
		virtual TFilterModeSettings GetFilterMode();
		
	private:
		//------------------------------
		// internal attributes
		TResourceFactory *mResFactory;
		TAddressModeSettings mAddressModes;
		TFilterModeSettings mFilterModes;
		IDirect3DTexture9* mTexture;

		//------------------------------
		// internal operations
	};
	
	//--------------------------------------------------------------------------
}
}
}


#endif	//__ming_fyp_render_TextureImpl_h__